---
layout: default
title: 首页
---




<!-- 博客列表 -->
<div class="gd-wrap-blogs">
    {% for post in paginator.posts %}
    <div class="gd-blogs" url="{{ post.url }}">
        <div class="gd-blogs-row">
            <i class="ellipsis-multi">{{ post.title }}</i>
            <span>{{  post.date | date: "%y-%m-%d" }}</span>
        </div>
        <div class="gd-blogs-row ellipsis-multi">{{ post.excerpt | strip_html }}</div>
    </div>
    {% endfor %}
</div>
<!-- 分页 -->
<div class="gd-wrap-paginator">
    <div class="ui-pagination"></div>
</div>

<!-- 分页 -->
<script type="text/javascript">
    function loadedCallback(index) {
        console.log('[ui-pagination] loadCallback', index);
    }

    function currentChange(index) {
        var url = window.location.protocol + '//'  + window.location.host;

        if (index !== '1') {
            url += '{{ site.paginate_path }}'.replace(':num', index);
        }

        window.location.href = url;
    }

    $('.ui-pagination').pagination({
            total: {{ paginator.total_posts }},
            pageCount: 6,
            pageSize: {{ paginator.per_page }},
            currentPage: {{ paginator.page }},
            loaded: loadedCallback,
            currentChange: currentChange
        });
</script>